package com.guashu.jaywayjsonpath.enums;

import com.guashu.jaywayjsonpath.renhang.PbocParserStrategy;
import com.guashu.jaywayjsonpath.renhang.parsestrategy.NoArrayParserStrategy;
import com.guashu.jaywayjsonpath.renhang.parsestrategy.OneDimensionalArrayParserStrategy;
import com.guashu.jaywayjsonpath.renhang.parsestrategy.TwoDimensionalArrayParserStrategy;

/**
 *  定义枚举类表示不同的表
 */
public enum PbocTable {
    PBOC_SCORE(PbocTableType.NO_ARRAY, new NoArrayParserStrategy()),
    PBOC_ACC_INFO(PbocTableType.ONE_DIMENSIONAL_ARRAY, new OneDimensionalArrayParserStrategy()),
    PBOC_ACC_REPAY_60_MONTHLY(PbocTableType.TWO_DIMENSIONAL_ARRAY, new TwoDimensionalArrayParserStrategy()),
    PBOC_ACC_REPAY_24_MONTHLY(PbocTableType.TWO_DIMENSIONAL_ARRAY, new TwoDimensionalArrayParserStrategy());

    private final PbocTableType tableType;
    private final PbocParserStrategy parserStrategy;

    PbocTable(PbocTableType tableType, PbocParserStrategy parserStrategy) {
        this.tableType = tableType;
        this.parserStrategy = parserStrategy;
    }

    public PbocTableType getTableType() {
        return tableType;
    }

    public PbocParserStrategy getParserStrategy() {
        return parserStrategy;
    }
}
